
import net.optix.ip.model.ModelLocator;
[Bindable]
private var model:ModelLocator	=	ModelLocator.getInstance();

import net.optix.ip.vo.InventionVO;
private var _invention:InventionVO;

public function set invention(value:InventionVO):void
{
	_invention	=	value;
	switch(model.role)
	{
		case 1:
			if(model.client.clientID == _invention.clientID)
			{
				this.label	=	"Assign the invention to a law firm without requesting a bid";
				this.visible	=	true;
			}
			break;
		case 3:
			if(model.firm.firmID == _invention.firmID && ( _invention.bConfirm	== 0 || _invention.bConfirm	== 2 ))
			{
				this.label	=	"Decline or accept the assignment";
				this.visible	=	true;
			}
			else
			{
				this.visible	=	false;
			}
			break;
		default:
			this.visible	=	false;
			break;
	}
}

public function get invention():InventionVO
{
	return _invention;
}